export function splitByMap<T>(
  str: string | null,
  fn: (val: string) => T,
  sep = ',',
  defaultValue: T[] = []
): T[] {
  if (str == null) return defaultValue
  return String(str).split(sep).map(fn)
}
